<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>投票详情</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <link rel="stylesheet" href="vote/css/vote_css.css" type="text/css"></link>
  <script type="text/javascript">
  	function submits(){
  		var number=document.getElementById("pageSize").value;
  		if(number<=0){
  			document.getElementById("pageSize").value=5;
  			alert("当前显示页数不能为零");  			
  		}
  		document.forms.submit();
  	}
  </script>
  </head>
  
  <body>
  <form action="getListByVoteDetail" method="post" name="forms"id="forms">
    <div id="vote">
		<div id="vote">
		<div class="top">
  			<table width="100%" cellpadding="0" cellspacing="0">
			<tr style="height:35px;" class="colors">
    			<td colspan="2" background="images/bg_03.gif"> 
    			&nbsp;<img src="images/index_32.gif"></img>&nbsp;员工投票
    			</td>    			
    		</tr>
    		</table>
  	</div>
		<div id="vote_main">
			<table width="99%" cellpadding="0" cellspacing="0" align="center">
			 	<tr>
			    	<td colspan="3" align="center" class="td_01" style="color:red ">
			    		<s:property value="vote.voteName"/>
			   		</td>
			    </tr>
				<tr>
					<td align="left" class="td_01" height="28">  			
			  			<br/>&nbsp;本页共显示<input type="text" name="pageSize" id="pageSize" size="1" value="${pageBean.pageSize}"/>&nbsp;<a href="javascript:submits()">GO>></a>条数据
	  				</td>
			    	<td colspan="2" align="right" class="td_01">
			    	<br>
			    		<img src="vote/images/1.gif"></img>				
			   			<a href="getListByVoteDetail?pageIndex=1">首页</a>&nbsp;
			   			<img src="vote/images/2.gif"></img>
						<c:if test="${pageBean.currentPage<=1}">上一页</c:if>
						<c:if test="${pageBean.currentPage>1}"><a href="getListByVoteDetail?pageIndex=${pageBean.currentPage-1 }">上一页</a></c:if>&nbsp;					    	
						<c:if test="${pageBean.currentPage>=pageBean.totalRecords}">下一页</c:if>
						<c:if test="${pageBean.currentPage<pageBean.totalRecords}"><a href="getListByVoteDetail?pageIndex=${pageBean.currentPage+1 }">下一页</a></c:if>&nbsp;
						<img src="vote/images/2-2.gif"></img>
						第${pageBean.currentPage}页&nbsp;					    	
						<a href="getListByVoteDetail?pageIndex=${pageBean.totalRecords }">末页</a>
						&nbsp;<img src="vote/images/3.gif"></img>
						共${pageBean.totalRecords }页
			   		</td>
			    </tr>
			   
				<tr>
					<td class="td_top" width="75%" colspan="2">&nbsp;员工姓名</td>
					<td class="td_top" width="25%">&nbsp;投票</td>					
				</tr>
				<s:iterator value="list">
					<tr>
						<td class="td_01" colspan="2">&nbsp;<s:property value="userName"/></td>
						<td class="td_01">&nbsp;<a href="voteDetail?voteId=<s:property value='vote.voteId'/>&userId=<s:property value='userId'/>">投你一票</a></td>					
					</tr>		
				</s:iterator>		
			</table>
		</div>
	</div>
	</form>
  </body>
</html>
